public class Temp
{
    private int tempNumber;

    private static int tempCounter = 2;
    
    private static final Temp RV = new Temp(0);
    private static final Temp FP = new Temp(1);
    private static final Temp VOID = new Temp(-1);
    
    private Temp(int n)
    {
	tempNumber = n;
    }

    public static Temp getRV()
    {
	return RV;
    }

    public static Temp getFP()
    {
	return FP;
    }

    public static Temp getVOID(){
	return VOID;
    }
    public Temp()
    {
	tempNumber = tempCounter++;
    }

    public String toString()
    {
	if (tempNumber == RV.tempNumber) return "RV";
	if (tempNumber == FP.tempNumber) return "FP";
	return "#"+ Integer.toString(tempNumber);
    }

    public boolean isPhysicalRegister()
    {
	if (tempNumber == FP.tempNumber) 
	    return true;
	else
	    return false;
    }

}